<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <meta name="renderer" content="webkit" />
    <meta name="author" content="中文Lee 360811363@qq.com">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link rel="stylesheet" href="../../../lib/layui-v2.6.3/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../../css/public.css" media="all" />
    <!--
    * [LupMisNotAllowedSync]
    * 本代码为系统自动生成代码，请根据自己业务进行修改;
    * 生成时间 2022-02-15 18:29:17;
    * 版权所有 2020-2022 lizhongwen，并保留所有权利;
    * 说明: 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和使用；不允许对程序代码以任何形式任何目的的再发布;
    * 作者: 中文Lee;
    * 作者主页: http://www.lizhongwen.com;
    * 邮箱: 360811363@qq.com;
    * QQ: 360811363;
    -->
</head>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <div>
                <form class="layui-form search-box" action="">

                    <div class="layui-inline">
                        <input class="layui-input" name="table_name" placeholder="表名称" autocomplete="off">
                    </div>
                    <div class="layui-inline">
                        <input class="layui-input" name="field_name" placeholder="字段名称" autocomplete="off">
                    </div>


                    <div class="layui-inline">
                        <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn">搜 索</button>
                    </div>
                </form>
            </div>
            <div id="form-list">
                <table class="layui-hide" id="data-list" lay-filter="data-list"></table>
            </div>
        </div>
    </div>
    <script src="../../../js/run.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script type="text/javascript">
        $init(function() {
            pageInit(function(pageInfo, toolbarHtml) {
                var jump = pageInfo.jump;
                var apiUrl = pageInfo.api_url;
                var queryUrl = pageInfo.query_url;
                var tableName = pageInfo.table_name;

                var cols = [{
                    type: 'checkbox'
                }, {
                    field: 'id',
                    title: 'ID',
                    hide: true
                }, {
                    field: 'system_serial_number',
                    title: '序号',
                    width: 65,
                    sort: false,
                    align: 'center',
                    type: 'numbers'
                }, {
                    field: 'table_remarks',
                    title: '表说明',
                    sort: false
                }, {
                    field: 'table_name',
                    title: '表名称',
                    sort: false
                }, {
                    field: 'field_remarks',
                    title: '字段说明',
                    sort: false
                }, {
                    field: 'field_name',
                    title: '字段名称',
                    sort: false
                }, {
                    field: 'input_type',
                    title: '字段输入类型',
                    sort: false
                }];
                loadData(base_gateway + queryUrl, cols, toolbarHtml, function(res) {
                    //console.log(res);
                }, "full-110", false);
                // 监听搜索操作
                doSearch();
                //监听操作事件(添加 删除 编辑)
                toolbarTap(function(data, pars, event) {
                    if (event == 'replacePathDo') {
                        if (data.length == 0) {
                            layer.msg('请选择一条记录');
                        } else {
                            var jump = pars.jump;
                            var gateway = pars.gateway;
                            var query = pars.query;
                            // console.log(query);
                            var tips = pars.tips;
                            var width = pars.width;
                            var height = pars.height;
                            var area = [width, height];
                            if (isEmpty(tips)) {
                                tips = "<font style='color:#ffffff'>参数未定义</font>";
                            }
                            var ids = "";
                            for (var i = 0; i < data.length; i++) {
                                ids += data[i].id + ",";
                                // ids[i] = checkStatus.data[i].id;
                            }
                            ids = ids.substring(0, ids.length - 1);
                            // tips = "<b style='color:#ffffff'>" + data[0].title + "</b>";
                            openFrame(tips, jump + '?ids=' + ids + "&gateway=" + gateway + "&query=" + query, area, 0.1);
                        }
                    }
                });
            });
        });
    </script>
</body>

</html>